<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0">
    <meta name="imagemode" content="force">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" type="image/x-icon" href="">
    <link rel="apple-touch-icon-precomposed" href="">
    <link href="__STATIC__/assets/css/main.css" rel="stylesheet" />
    <script src="__STATIC__/assets/js/jquery.min.js"></script>

		<title></title>
		<style>
			body{
				height:auto;
				overflow-y: auto;
			}
			.container-personcenter-footer ul li:nth-child(3) img{
				top: -10%;
			}
			.signups{
				margin-bottom: 12%;
			}
			.bmbtn{
	padding: 10px 10px 10px 10px;
    border: none;
    width: 120px;
    float: right;
    background: #006582;
    color: #fff;
			}
		</style>
	</head>
	<body>
		<div class="signup-header"></div>
		<div class="signups">

 

    	</div>
 <div class="loading-modal load4" id="loading">
        <div class="loader">Loading...</div>
        <style>
            .loading-modal.load4.ng-hide {
                opacity: 0.1;
            }

            .loading-modal {
                transition: all linear 0.3s;
                position: absolute;
                z-index: 99999;
                width: 100%;
                height: 100%;
                left: 0;
                top: 0;
                background: rgba(0, 0, 0, 0.7);
                opacity: 1;
                overflow: hidden;
            }

            .load4 .loader {
                font-size: 20px;
                margin: 5em auto;
                width: 1em;
                height: 1em;
                border-radius: 50%;
                position: relative;
                text-indent: -9999em;
                top: 35%;
                -webkit-animation: load4 1.3s infinite linear;
                animation: load4 1.3s infinite linear;
            }

            @-webkit-keyframes load4 {
                0%, 100% {
                    box-shadow: 0em -3em 0em 0.2em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 0em #ffffff;
                }

                12.5% {
                    box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 0.2em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                25% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 0.2em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                37.5% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 0.2em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                50% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 0.2em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                62.5% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 0.2em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                75% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0.2em #ffffff, -2em -2em 0 0em #ffffff;
                }

                87.5% {
                    box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 0.2em #ffffff;
                }
            }

            @keyframes load4 {
                0%, 100% {
                    box-shadow: 0em -3em 0em 0.2em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 0em #ffffff;
                }

                12.5% {
                    box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 0.2em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                25% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 0em #ffffff, 3em 0em 0 0.2em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                37.5% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 0em #ffffff, 2em 2em 0 0.2em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 -0.5em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                50% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 0em #ffffff, 0em 3em 0 0.2em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 -0.5em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                62.5% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 0em #ffffff, -2em 2em 0 0.2em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 -0.5em #ffffff;
                }

                75% {
                    box-shadow: 0em -3em 0em -0.5em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0.2em #ffffff, -2em -2em 0 0em #ffffff;
                }

                87.5% {
                    box-shadow: 0em -3em 0em 0em #ffffff, 2em -2em 0 -0.5em #ffffff, 3em 0em 0 -0.5em #ffffff, 2em 2em 0 -0.5em #ffffff, 0em 3em 0 -0.5em #ffffff, -2em 2em 0 0em #ffffff, -3em 0em 0 0em #ffffff, -2em -2em 0 0.2em #ffffff;
                }
            }
        </style>
    </div>
<div class="container-personcenter-footer">
                  <ul>
                      <li class="footbannera"><img src="__STATIC__/assets/img/centerb.png" /></li>
                      <li class="footbannerb"><img src="__STATIC__/assets/img/centerd.png" /></li>
                      <li class="footbannerc"><img src="__STATIC__/assets/img/centere.png" /></li>
                  </ul>
              </div>
	</body>
<script>
        $(document).ready(function(){
        	$("#loading").hide();
         $.ajax({
            type: "post",
            url: "ajaxevents",
               data: {"num":0},
            success: function (data) {   //成功后回调
              if(data.code == 1){
              	$.each(data.events, function(key, val) { 
              		if(typeof val == "object"){
              		$(".signups").append(
                             	'<div class="signup">'+
                             		'<div class="signup-container">'+
					                		 '<span>'+data.events[key].activity_title+'</span>'+
					                '</div>'+
					                '<div class="signup-img">'+
					                
					                  			'<img src="/vdma/public/uploads/'+ data.events[key].activity_img +'">'+
					                  			
					                  			'<div class="signup-bottom">'+
					                  			'<ul>'+
					                  			  '<li>'+
					                  			      '<p>'+data.events[key].activity_place+'</p>'+
					                  			       '<p>'+data.events[key].activity_time+'</p>'+
					                  			'</li>'+
					                  			           '<input type="button" class="bmbtn" onclick="enroll(this)" value="立即报名"  />'+
					                  			 '<li>'+
					                  			
					                  			'</ul>'+				                  			
					                  			'</div>'+
					                '</div>'+
					            '</div>'
                             )
              		
              		}
//            		console.log(data.events[key].activity_place)
//            		console.log(data.events[key].activity_time)
//                   console.log(data.events[key].activity_title)                       
                       	
				}); 

              }else{
              	             
                   alert("失败")
              
              }


            }
            //beforeSend: function(){  /发送请求前调用，可以放一些"正在加载"之类额话
            //    alert("正在加载");
            //}
            //})
        })
         
        	
        	
        	
        	
        	
        	
        	
             $(".footbannera").click(function() {
            window.location.href = "{:url('index')}";
        })
        $('.footbannerb').click(function() {
         window.location.href = "{:url('events')}";
        })
         $(".footbannerc").click(function() {
            window.location.href = "{:url('personcenter')}";
        })
            
        


              
      })
</script>


<script>
  function enroll(_this){
      var events_id = $(_this).attr('events_id');
      $.ajax({
        type:'post',
        url:"{:url('enroll')}",
        data:{'events_id':events_id},
        success:function(data){
          if(data.code == 1){
            alert('报名成功');
          }else{
            alert('报名失败');
          }
        }
      })
  }
   $("body").scroll(function () {
             	console.log("1")
             	
             	
             	
             })
</script>
</html>
